package org.lanettiesso.dubbo.simple.consumer.controller;

import org.lanettiesso.dubbo.simple.annotation.Reference;
import org.lanettiesso.dubbo.simple.service.HelloService;
import org.springframework.web.bind.annotation.RequestMapping;

public class HelloController {

    @Reference
    private HelloService helloService;

    @RequestMapping("/hello")
    public Object sayHello(String name) {
        helloService.sayHello(name);
        return "ok";
    }

    @RequestMapping("/time")
    public Object getTime() {
        return helloService.getTime();
    }
}
